home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: Jan. 8, 1997
- // Author: ap
- //
- // Description: defines behaviour and layout of jointContext
- // tool property sheet
- //
-
-
- global proc jointToolPropCallback (string $parent, string $whichCallback)
- //
- // Procedure Name:
- // jointToolPropCallback
- //
- // Description:
- //
- // Input Arguments:
- // parent name, and
- // current callback name.
- //
- // Return Value:
- // None.
- //
- {
- setParent $parent;
-
- string $whichCtx = `currentCtx`;
- string $dofOption;
-
- switch ($whichCallback)
- {
- case "dofOption":
- if (`checkBoxGrp -q -v1 jpDofCheckBoxGrp`) {
- $dofOption += "x";
- }
- if (`checkBoxGrp -q -v2 jpDofCheckBoxGrp`) {
- $dofOption += "y";
- }
- if (`checkBoxGrp -q -v3 jpDofCheckBoxGrp`) {
- $dofOption += "z";
- }
-
- if ("" == $dofOption) {
- $dofOption = "none";
- }
- jointCtx -e -dJ $dofOption $whichCtx;
- break;
-
- case "autoJointOrientMenu":
- $dofOption = `optionMenuGrp -q -v autoJointOrient`;
- jointCtx -e -ajo $dofOption $whichCtx;
- break;
-
- case "scaleCompensateOn":
- jointCtx -e -scJ true $whichCtx;
- break;
-
- case "scaleCompensateOff":
- jointCtx -e -scJ false $whichCtx;
- break;
-
- case "autoLimitsOn":
- jointCtx -e -jal true $whichCtx;
- break;
-
- case "autoLimitsOff":
- jointCtx -e -jal false $whichCtx;
- break;
-
- case "createIKHandleOn":
- frameLayout -e -en true -cl false ikHandleFrame;
- jointCtx -e -ikh true $whichCtx;
- break;
-
- case "createIKHandleOff":
- frameLayout -e -en false -cl true ikHandleFrame;
- jointCtx -e -ikh false $whichCtx;
- break;
-
- default:
- break;
- }
- return;
- }
-
-
- global proc jointToolSetCallbacks (string $parent)
- //
- // Procedure Name:
- // jointToolSetCallbacks
- //
- // Description:
- //
- // Input Arguments:
- // parent name.
- //
- // Return Value:
- // None.
- //
- {
- setParent $parent;
- string $whichCtx = `currentCtx`;
-
- checkBoxGrp -e
- -cc `CBG "jointToolProp" $parent "dofOption"`
- jpDofCheckBoxGrp;
-
- optionMenuGrp -e
- -cc `CBG "jointToolProp" $parent "autoJointOrientMenu"`
- autoJointOrient;
-
- checkBoxGrp -e
- -onc `CBG "jointToolProp" $parent "scaleCompensateOn"`
- -ofc `CBG "jointToolProp" $parent "scaleCompensateOff"`
- scaleCompensate;
-
- checkBoxGrp -e
- -onc `CBG "jointToolProp" $parent "autoLimitsOn"`
- -ofc `CBG "jointToolProp" $parent "autoLimitsOff"`
- autoLimits;
-
- checkBoxGrp -e
- -onc `CBG "jointToolProp" $parent "createIKHandleOn"`
- -ofc `CBG "jointToolProp" $parent "createIKHandleOff"`
- createIKHandle;
-
- return;
- }
-
-
- global proc jointToolProperties ()
- //
- // Procedure Name:
- // jointToolProperties
- //
- // Description:
- //
- // Input Arguments:
- // None.
- //
- // Return Value:
- // None.
- //
- {
- setUITemplate -pushTemplate OptionsTemplate;
-
- string $parent = `toolPropertyWindow -q -location`;
- string $curctx = `currentCtx`;
-
- setParent $parent;
-
- columnLayout -adj true jointTool;
- frameLayout -collapsable true -collapse false
- -l "Joint Settings" jointFrame;
- columnLayout jointOptions;
- separator -style "none";
- $parent = `setParent -query`;
-
- checkBoxGrp
- -label "Degrees of Freedom"
- -ncb 3
- -la3 "X" "Y" "Z"
- jpDofCheckBoxGrp;
-
- separator jSep1;
-
- optionMenuGrp -l "Auto Joint Orient" autoJointOrient;
- menuItem -l "none" ajoNone;
- menuItem -l "xyz" ajoXYZ;
- menuItem -l "yzx" ajoYZX;
- menuItem -l "zxy" ajoZXY;
- menuItem -l "xzy" ajoXZY;
- menuItem -l "yxz" ajoYXZ;
- menuItem -l "zyx" ajoZYX;
-
- separator jSep2;
-
- checkBoxGrp
- -label ""
- -l1 "Scale Compensate"
- -ncb 1
- scaleCompensate;
-
- checkBoxGrp
- -label ""
- -l1 "Auto Joint Limits"
- -ncb 1
- autoLimits;
-
- checkBoxGrp
- -label ""
- -l1 "Create IK Handle"
- -ncb 1
- createIKHandle;
-
- jointToolSetCallbacks $parent;
-
- setParent ..; // jointOptions
- setParent ..; // jointFrame
-
- // context options for ikHandle: default is collapsed.
- //
- $parent = `setParent -query`;
- ikHandleOptionLayout( $parent, true );
-
- setParent ..; // joint
-
- setUITemplate -popTemplate;
-
- return;
- }
-